home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18165 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  582 b 

  1. Path: news.production.compuserve.com!news
  2. From: anw <102044.3670@CompuServe.COM>
  3. Newsgroups: comp.lang.c++
  4. Subject: Standard struct layout in C++?
  5. Date: 19 Apr 1996 04:03:04 GMT
  6. Organization: CompuServe, Inc. (1-800-689-0736)
  7. Message-ID: <4l739o$gt4$2@mhade.production.compuserve.com>
  8.  
  9. Does C++ guarantee any data layout in classes (or structs)?  I
  10. can't find any reference in Ellis and Stroustrup (the ARM).  The
  11. problem I am trying to solve is reading and writing blocks of data
  12. that represent classes or structures; e.g.:
  13.  
  14. class foo;
  15.  
  16. read(fd, buffer, sizeof(foo));
  17.  
  18. Thanx,
  19.  
  20. anw
  21.